package com.skillworld.webapp.model.userservice;

import com.skillworld.webapp.model.team.Team;
import com.skillworld.webapp.model.user.User;

@SuppressWarnings("serial")
public class AlreadyTeamMemberException extends Exception 
{

    private Team team;
    private User user;
    
    
    public AlreadyTeamMemberException(Team team, User user) 
    {
        super("User " + user.getUserId() + " is already a member of team " + team.getTeamId());
        this.team = team;
        this.user = user;
    }

    
    public Team getTeam()
    {
        return team;
    }
    
    public User getUser() 
    {
        return user;
    }
    
}
